Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test case for internal/errors/discoverer.go #874

Merged
merged 9 commits into from
Dec 21, 2020

Conversation

hlts2
Copy link
Contributor

@hlts2 hlts2 commented Dec 8, 2020

Signed-off-by: hlts2 hiroto.funakoshi.hiroto@gmail.com

Description:

I added the test cases for internal/errors/discoverer.go and comments.

grammar check passed

Related Issue:

How Has This Been Tested?:

Environment:

  • Go Version: 1.15.2
  • Docker Version: 19.03.8
  • Kubernetes Version: 1.18.2
  • NGT Version: 1.12.1

Types of changes:

  • Bug fix [type/bug]
  • New feature [type/feature]
  • Add tests [type/test]
  • Security related changes [type/security]
  • Add documents [type/documentation]
  • Refactoring [type/refactoring]
  • Update dependencies [type/dependency]
  • Update benchmarks and performances [type/bench]
  • Update CI [type/ci]

Changes to Core Features:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your core changes, as applicable?
  • Have you successfully ran tests with your changes locally?

Checklist:

  • I have read the CONTRIBUTING document.
  • I have checked open Pull Requests for the similar feature or fixes?
  • I have added tests and benchmarks to cover my changes.
  • I have ensured all new and existing tests passed.
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation accordingly.

@hlts2 hlts2 requested a review from kevindiu December 8, 2020 06:04
@hlts2 hlts2 self-assigned this Dec 8, 2020
@vdaas-ci
Copy link
Collaborator

vdaas-ci commented Dec 8, 2020

[CHATOPS:HELP] ChatOps commands.

  • 🙆‍♀️ /approve - approve
  • 💌 /changelog - add changelog comment
  • 🍱 /format - format codes and add licenses
  • /gen-test - generate test codes
  • 🏷️ /label - add labels
  • /rebase - rebase master

internal/errors/discoverer_test.go Outdated Show resolved Hide resolved
internal/errors/discoverer_test.go Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Dec 8, 2020

Codecov Report

Merging #874 (c9cd358) into master (f72ff79) will increase coverage by 0.07%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #874      +/-   ##
==========================================
+ Coverage   18.85%   18.92%   +0.07%     
==========================================
  Files         423      423              
  Lines       19600    19600              
==========================================
+ Hits         3696     3710      +14     
+ Misses      15685    15672      -13     
+ Partials      219      218       -1     
Impacted Files Coverage Δ
internal/errors/discoverer.go 100.00% <ø> (+100.00%) ⬆️
internal/worker/queue.go 98.33% <0.00%> (-1.67%) ⬇️
internal/errgroup/group.go 92.42% <0.00%> (-1.52%) ⬇️
internal/worker/worker.go 82.29% <0.00%> (-1.05%) ⬇️
internal/errors/errors.go 31.57% <0.00%> (+15.78%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f72ff79...000659b. Read the comment docs.

kevindiu
kevindiu previously approved these changes Dec 16, 2020
Copy link
Contributor

@kevindiu kevindiu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -0,0 +1,320 @@
package errors
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[golangci] reported by reviewdog 🐶
package should be errors_test instead of errors (testpackage)

@hlts2 hlts2 changed the title Add test case for internal/errors/discoverer.go Add test case for internal/errors/discoverer.go Dec 17, 2020
internal/errors/discoverer.go Outdated Show resolved Hide resolved
kevindiu
kevindiu previously approved these changes Dec 17, 2020
Copy link
Contributor

@kevindiu kevindiu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@vankichi vankichi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I recommend you to use '' instead of `` when you'd like to use the symbol for wrapping the actual value in each test case name.
If you fix, LGTM

internal/errors/discoverer_test.go Outdated Show resolved Hide resolved
internal/errors/discoverer_test.go Outdated Show resolved Hide resolved
internal/errors/discoverer_test.go Outdated Show resolved Hide resolved
internal/errors/discoverer_test.go Outdated Show resolved Hide resolved
internal/errors/discoverer_test.go Outdated Show resolved Hide resolved
kevindiu
kevindiu previously approved these changes Dec 21, 2020
Copy link
Contributor

@kevindiu kevindiu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@vankichi
Copy link
Contributor

/rebase
/format
/approve

@vdaas-ci
Copy link
Collaborator

[REBASE] Rebase triggered by vankichi for branch: test/internal/discoverer-errors

hlts2 and others added 8 commits December 21, 2020 05:40
Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
Co-authored-by: Kiichiro YUKAWA <kyukawa315@gmail.com>
Co-authored-by: Kiichiro YUKAWA <kyukawa315@gmail.com>
Co-authored-by: Kiichiro YUKAWA <kyukawa315@gmail.com>
Co-authored-by: Kiichiro YUKAWA <kyukawa315@gmail.com>
Co-authored-by: Kiichiro YUKAWA <kyukawa315@gmail.com>
@vdaas-ci
Copy link
Collaborator

[FORMAT] Updating license headers and formatting go codes triggered by vankichi.

Copy link
Collaborator

@vdaas-ci vdaas-ci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[APPROVED] This PR is approved by vankichi.

@vankichi vankichi merged commit 933cba5 into master Dec 21, 2020
@vankichi vankichi deleted the test/internal/discoverer-errors branch December 21, 2020 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants